package com.questionnaire.core.shiro.manager;

import com.questionnaire.core.cache.RedisCache;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;

/**
 * @description: Shiro Redis的Session管理器
 * @author: YSL
 * @time: 2023/11/9 14:14
 */
public class RedisManager implements CacheManager {

    @Override
    public <K, V> Cache<K, V> getCache(String cacheName) throws CacheException {
        System.out.println(cacheName);
        return new RedisCache<K, V>(cacheName);
    }
}
